3.20 \(\int \frac{\tan (x)}{\sqrt{a+b \cos (x)}} \, dx\)

Optimal. Leaf size=24 \[ \frac{2 \tanh ^{-1}\left (\frac{\sqrt{a+b \cos (x)}}{\sqrt{a}}\right )}{\sqrt{a}} \]

[Out]

(2*ArcTanh[Sqrt[a + b*Cos[x]]/Sqrt[a]])/Sqrt[a]

________________________________________________________________________________________

Rubi [A]  time = 0.0579263, antiderivative size = 24, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.231, Rules used = {2721, 63, 207} \[ \frac{2 \tanh ^{-1}\left (\frac{\sqrt{a+b \cos (x)}}{\sqrt{a}}\right )}{\sqrt{a}} \]

Antiderivative was successfully verified.

[In]

Int[Tan[x]/Sqrt[a + b*Cos[x]],x]

[Out]

(2*ArcTanh[Sqrt[a + b*Cos[x]]/Sqrt[a]])/Sqrt[a]

Rule 2721

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[(x^p*(a + x)^m)/(b^2 - x^2)^((p + 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2
 - b^2, 0] && IntegerQ[(p + 1)/2]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{\tan (x)}{\sqrt{a+b \cos (x)}} \, dx &=-\operatorname{Subst}\left (\int \frac{1}{x \sqrt{a+x}} \, dx,x,b \cos (x)\right )\\ &=-\left (2 \operatorname{Subst}\left (\int \frac{1}{-a+x^2} \, dx,x,\sqrt{a+b \cos (x)}\right )\right )\\ &=\frac{2 \tanh ^{-1}\left (\frac{\sqrt{a+b \cos (x)}}{\sqrt{a}}\right )}{\sqrt{a}}\\ \end{align*}

Mathematica [A]  time = 0.0114887, size = 24, normalized size = 1. \[ \frac{2 \tanh ^{-1}\left (\frac{\sqrt{a+b \cos (x)}}{\sqrt{a}}\right )}{\sqrt{a}} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[x]/Sqrt[a + b*Cos[x]],x]

[Out]

(2*ArcTanh[Sqrt[a + b*Cos[x]]/Sqrt[a]])/Sqrt[a]

________________________________________________________________________________________

Maple [A]  time = 0.035, size = 19, normalized size = 0.8 \begin{align*} 2\,{\frac{1}{\sqrt{a}}{\it Artanh} \left ({\frac{\sqrt{a+b\cos \left ( x \right ) }}{\sqrt{a}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(x)/(a+b*cos(x))^(1/2),x)

[Out]

2*arctanh((a+b*cos(x))^(1/2)/a^(1/2))/a^(1/2)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x)/(a+b*cos(x))^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.72541, size = 278, normalized size = 11.58 \begin{align*} \left [\frac{\log \left (\frac{b^{2} \cos \left (x\right )^{2} + 8 \, a b \cos \left (x\right ) + 4 \,{\left (b \cos \left (x\right ) + 2 \, a\right )} \sqrt{b \cos \left (x\right ) + a} \sqrt{a} + 8 \, a^{2}}{\cos \left (x\right )^{2}}\right )}{2 \, \sqrt{a}}, -\frac{\sqrt{-a} \arctan \left (\frac{{\left (b \cos \left (x\right ) + 2 \, a\right )} \sqrt{b \cos \left (x\right ) + a} \sqrt{-a}}{2 \,{\left (a b \cos \left (x\right ) + a^{2}\right )}}\right )}{a}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x)/(a+b*cos(x))^(1/2),x, algorithm="fricas")

[Out]

[1/2*log((b^2*cos(x)^2 + 8*a*b*cos(x) + 4*(b*cos(x) + 2*a)*sqrt(b*cos(x) + a)*sqrt(a) + 8*a^2)/cos(x)^2)/sqrt(
a), -sqrt(-a)*arctan(1/2*(b*cos(x) + 2*a)*sqrt(b*cos(x) + a)*sqrt(-a)/(a*b*cos(x) + a^2))/a]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tan{\left (x \right )}}{\sqrt{a + b \cos{\left (x \right )}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x)/(a+b*cos(x))**(1/2),x)

[Out]

Integral(tan(x)/sqrt(a + b*cos(x)), x)

________________________________________________________________________________________

Giac [A]  time = 1.97136, size = 30, normalized size = 1.25 \begin{align*} -\frac{2 \, \arctan \left (\frac{\sqrt{b \cos \left (x\right ) + a}}{\sqrt{-a}}\right )}{\sqrt{-a}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x)/(a+b*cos(x))^(1/2),x, algorithm="giac")

[Out]

-2*arctan(sqrt(b*cos(x) + a)/sqrt(-a))/sqrt(-a)